From c1873df76dc8d1907405ccb8af8ef7a0da1c63e9 Mon Sep 17 00:00:00 2001 From: justbur Date: Wed, 23 Sep 2015 14:00:46 -0400 Subject: [PATCH] Fix #65 Don't try to backup the value of `prefix-help-command` because it was getting set to `which-key-show-next-page` somehow creating an infinite recursion error. Just call `describe-prefix-bindings` directly, which should cover almost all cases. --- which-key.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/which-key.el b/which-key.el index e4d809815d4..53a2574251f 100644 --- a/which-key.el +++ b/which-key.el @@ -321,8 +321,8 @@ to a non-nil value for the execution of a command. Like this Used when `which-key-popup-type' is frame.") (defvar which-key--echo-keystrokes-backup nil "Internal: Backup the initial value of `echo-keystrokes'.") -(defvar which-key--prefix-help-cmd-backup nil - "Internal: Backup the value of `prefix-help-command'.") +;; (defvar which-key--prefix-help-cmd-backup nil +;; "Internal: Backup the value of `prefix-help-command'.") (defvar which-key--pages-plist nil "Internal: Holds page objects") (defvar which-key--lighter-backup nil @@ -377,7 +377,6 @@ alongside the actual current key sequence when (progn (setq which-key--echo-keystrokes-backup echo-keystrokes) (unless which-key--is-setup (which-key--setup)) - (setq which-key--prefix-help-cmd-backup prefix-help-command) (when which-key-use-C-h-for-paging (setq prefix-help-command #'which-key-show-next-page)) (when which-key-show-remaining-keys @@ -387,7 +386,6 @@ alongside the actual current key sequence when (add-hook 'focus-in-hook #'which-key--start-timer) (which-key--start-timer)) (setq echo-keystrokes which-key--echo-keystrokes-backup) - (setq prefix-help-command which-key--prefix-help-cmd-backup) (when which-key-show-remaining-keys (remove-hook 'pre-command-hook #'which-key--lighter-restore)) (remove-hook 'pre-command-hook #'which-key--hide-popup) @@ -1317,7 +1315,7 @@ Will force an update if called before `which-key--update'." (progn (which-key--hide-popup-ignore-command) (which-key--stop-timer) - (funcall which-key--prefix-help-cmd-backup) + (describe-prefix-bindings) (which-key--start-timer)) (let* ((next-event-if-showing ;; forces event into current key sequence -- 2.30.2